package com.source.rabbitmq.service;

import com.source.rabbitmq.domain.Book;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

/**
 * @Author wengqy
 * @Date 2021/1/31
 */
@Service
public class BookService {
    @RabbitListener(queues = {"atguigu.news"})
    public void   recieveBook(Book book){
        System.out.println("BookService接收的消息为："+book);
    }
}
